/*
 * SignalData.cpp
 *
 *  Created on: Jul 13, 2009
 *      Author: zaca
 */

#include "edfsignaldata.h"

#include <iostream>

namespace biosignal
{
namespace edf
{

using namespace std;

EDFSignalData::EDFSignalData(const EDFSourceSignal * signal_info, int size) :
        SignalData(signal_info), edf_signal_info_(signal_info)
{
    data_.resize(size, 0);
//	cout << "creating edf signal data for : " << edf_signal_info_->label();
//	cout << " nr samples : " << edf_signal_info_->nr_samples_in_data_record()
//			<< endl;
}

EDFSignalData::~EDFSignalData()
{
//		cout << "deleting edf signal data for : " << edf_signal_info_->label() << endl;
}

void EDFSignalData::value(unsigned int sample_nr, double value)
{
    data_[sample_nr] = value;
}
double EDFSignalData::value(unsigned int sample_nr) const
{
    return edf_signal_info_->value(data_[sample_nr]);
}

int EDFSignalData::size() const
{
    return data_.size();
}

}
}
